<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      var kinds = prompt("请输入水果名字：")
      switch (kinds) {
        case "苹果":
          alert("3.5/斤")
          break
        case "香蕉":
          alert("3.0/斤")
          break
        default:
          alert("没有此水果")
      }
    </script>
  </body>
</html>
